# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Dct Mei <dctxmei@yandex.com>
# Contributor: Eric S. Londres <elondres@stevens.edu>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Cillian Berragan <cjberragan@gmail.com>
# Contributor: Felix Golatofski <contact@xdfr.de>

pkgname=nyxt
pkgver=3.9.2
pkgrel=1
pkgdesc='A keyboard-driven web browser designed for power users'
arch=('loong64' 'x86_64')
url='https://nyxt.atlas.engineer'
license=('BSD')
depends=(
  'glibc'
  'hicolor-icon-theme'
  'enchant'
  'glib-networking'
  'gobject-introspection-runtime'
  'gsettings-desktop-schemas'
  'libfixposix'
  'webkit2gtk-4.1'
  'zstd'
)
# If someday Nyxt works with other Lisps, replace 'sbcl' with 'common-lisp'.
# NOTE: sbcl provides both common-lisp and cl-asdf.
makedepends=(
  'git'
  'sbcl'
  'cl-asdf'
)
optdepends=(
  'gstreamer: for HTML5 audio/video'
  'gst-plugins-base: for HTML5 audio/video'
  'gst-plugins-good: for HTML5 audio/video'
  'gst-plugins-bad: for HTML5 audio/video'
  'gst-plugins-ugly: for HTML5 audio/video'
)
options=('!strip' '!makeflags')
source=("$pkgname-$pkgver.tar.xz::https://github.com/atlas-engineer/nyxt/releases/download/$pkgver/nyxt-$pkgver-source-with-submodules.tar.xz")
sha512sums=('d2df3c0dc74cb9548967c8bcd9638f287c876990f40b2643c5f3f7ef89b140854f5b2337ab40d4f1db1aaf2f9b0677df4046ffea8162c7e9c7c0d7200bd3da13')
b2sums=('1ba407ea9c3c2df27e53f81e55570d31cd73f4500433b64c9a556828de8b1cb8b7fc7fde6296a84f5462278aa8dced2498e8dafda6a61d901294ae1510fa9df3')

build() {
  make all
}

package() {
  make PREFIX=/usr DESTDIR="$pkgdir" install

  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" licenses/*
}
